<template>
    <van-nav-bar
        left-text="我的收货地址"
        left-arrow
        @click-left="onClickLeft"
    />
    <van-address-list
        v-model="chosenAddressId"
        :list="addressList.list"
        default-tag-text="默认"
        @add="onAdd"
        @edit="onEdit"
    />
</template>

<script setup lang="ts">
import { useAddress } from '../hooks/addressList'
const { chosenAddressId, onAdd, onEdit, addressList, onClickLeft } = useAddress()
</script>

<style scoped>
:deep(.van-icon:before) {
    color: rgb(34, 34, 34);
    font-size: 20px;
}
:deep(.van-nav-bar__text) {
    color: rgb(19, 19, 19);
    font-size: 16px;
    font-weight: 500;
}
:deep(.van-icon-success)::before {
    content: '';
}
</style>
